home *** CD-ROM | disk | FTP | other *** search
/ Mac Mania 2 / MacMania 2.toast / Demo's / Tools&Utilities / Programming / MacStarter Pascal 1.0 / READ ME < prev   
Encoding:
Text File  |  1993-12-11  |  5.7 KB  |  138 lines  |  [TEXT/ttxt]

  1.  
  2. MacStarter_Pascal, Version 1.0,
  3.                    released December 1993.
  4.  
  5. by:  David J. Eck
  6.      Department of Mathematics
  7.      Hobart and William Smith Colleges
  8.      Geneva, NY   14456
  9.      
  10.      E-mail: eck@hws.bitnet
  11.      
  12.      
  13.  
  14. This READ ME file is part of MacStarter_Pascal, an
  15. application shell for writing Macintosh applications
  16. ranging from very quick-and-dirty to moderately
  17. complex, using THINK Pascal 4.0.  It uses the
  18. object-oriented features of THINK Pascal to
  19. implement windows with the standard Macintosh
  20. behavior.  The windows can contain "decorations"
  21. such as buttons and text-input boxes.  A lot of
  22. comments are included in the source files, and the
  23. source code for several simple applications is
  24. included. Also included (and usable separately from
  25. the rest of the shell) is a sophisticated unit for
  26. working with mathmatical expressions such as "x^2+7"
  27. and "sin(2*x)"; the unit includes procedures for
  28. parsing and evaluating such expresssions.  One of
  29. the sample applications shows how this unit can be
  30. used in a function-graphing application.
  31.  
  32. Of course, THINK Pascal comes with a very
  33. sophisticated application shell, the THINK Class
  34. Library, but that is hard to learn and is really not
  35. appropriate for small, short projects that don't
  36. need all the bells and whistles. I wrote
  37. MacStarter_Pascal for my own use and have used it to
  38. write about a half-dozen reasonably serious programs
  39. and to knock off a few small utility programs. It is
  40. not perfect, and I expected to do more work on it
  41. before giving it away to other programmers, but
  42. circumstances are forcing me to switch (unwillingly)
  43. a lot of my programming to C and C++, and I don't
  44. expect that I will ever get around to making major
  45. revisions. Furthermore, two other people have used
  46. it and encouraged me to circulate it more widely.
  47. So, here it is.  I would be happy to receive and
  48. respond to any comments.
  49.  
  50. By the way, the name I use for my basic window
  51. class, xWindow, was chosen befor I ever heard of
  52. X Windows, and has nothing to do with it.  (It's a
  53. weak wordplay on "Eck's Window".)
  54.  
  55.  
  56. --------------------------------------------------------
  57.  
  58. Here is what you get in the MacStarter_Pascal
  59. package:
  60.  
  61. (1) generic.π is a THINK Pascal 4.0 project file
  62.     that you can use as a starting point for your
  63.     applications.  It uses the Pascal source file
  64.     applicationProcs.p, the resource file generic.rsrc,
  65.     and several source files from the folder "xWindows
  66.     definitions files".  A good place to start would be
  67.     to open this project, run the program, and start
  68.     reading some of the source files it includes.
  69.     The first thing to read is applicationProcs.p;
  70.     this file includes some instructions for creating
  71.     applications.  (Other sample applicationProcs
  72.     files contain more instructions and hints.)
  73.     
  74. (2) applicationsProcs.p and noCommentsProcs.p are two
  75.     versions of the same UNIT, one with lots of comments
  76.     and one with all the comments removed (because they
  77.     quickly get annoying).  For small, quick-and-dirty
  78.     programs, all you will do is modify one of these
  79.     files (saving a copy of the original, of course),
  80.     and use it with generic.π and generic.rsrc.
  81.     For more sophisticated programs, you will probably
  82.     want to add units and modify resources.  In that case,
  83.     you should probably create a new project folder and
  84.     start by copying generic.π, generic.rsrc and
  85.     noCommentsProcs.p into that folder.  (Or, copy
  86.     an existing folder like "Text Window starter".)
  87.     
  88. (3) generic.rsrs is the resource file for use with the
  89.     project generic.π
  90.     
  91. (4) Text Window starter is a project folder for a simple
  92.     text-editing application.  It can save, open and
  93.     print text files.  This can be a starting point for
  94.     interesting applications.  (I have written several.
  95.     If you want to use file types and icons with your 
  96.     program, you will have to modify the resource file
  97.     and also create a custom version of the file
  98.     xTextFileWindow.p to work with your file type.)
  99.     
  100. (5) applicationProcs.calc is a modified version of the
  101.     file noCommentProcs.p for a very simple calculator
  102.     program.  The file includes instructions for how to
  103.     use it with generic.π.  This illustrates use of
  104.     text windows, radio button groups, default buttons
  105.     and text-input boxes.
  106.     
  107. (6) TextReaderExample ƒ is a project folder that provides
  108.     another sample program, including the use of a
  109.     TextReader class that can be used to get convenient
  110.     access to the text in a text window.
  111.     
  112. (7) simpleGraph example ƒ is the last sample project
  113.     folder.  This one illustrates the use of the
  114.     "expresssion" unit for parsing and evaluating
  115.     mathematical expressions.  It also illustrates the
  116.     definition of a new decoration type, this one for
  117.     displaying the graph of a function.
  118.     
  119. (8) The folder "xWindows definitions files" contains all
  120.     the source files used in the generic application
  121.     project and in the other sample projects (plus one,
  122.     xListDecoration.p, that isn't used in any of the
  123.     samples).  The most fundamental files are:  xWindow.p,
  124.     xControlDecoration.p, xInputDecoration.p, xTextWindow,
  125.     xTextFileWindow.p, TextPrint.p and StandardMain.p.
  126.     All these files have been used in a number of programs
  127.     and should be reasonably well debugged.  The files
  128.     xFigureDecoration.p, xScaledGraphicsDecoration.p,
  129.     xExpression.p, xExpressionInput.p, xListDecoration.p,
  130.     TextReader.p and "Main w/ suspend.p" were written
  131.     for specific purposes, for which they work; but some
  132.     of them were written with lots of extra bells and whistles
  133.     that have not been adequately tested.  All thes files have
  134.     a lot of comments.  (Only the interface sections of
  135.     the UNITS are commented; you shouldn't ever need
  136.     to look at the implementation sections.)
  137.     
  138.